package net.jlibrary.student.action.vo;

import java.io.Serializable;
import java.util.Date;

import org.springframework.format.annotation.DateTimeFormat;

import com.fasterxml.jackson.annotation.JsonFormat;

import net.jlibrary.common.CoreConstants;
import net.jlibrary.common.core.annotation.VoForPo;
import net.jlibrary.common.core.entity.BaseVo;
import net.jlibrary.student.domain.Specialty;

@VoForPo(Specialty.class)
public class SpecialtyVo extends BaseVo {
	private static final long serialVersionUID = -7779570351075723931L;
	private Long id;
	private String name;
	private String code;
	private boolean valid;
	@DateTimeFormat(pattern = CoreConstants.DATETIME_FORMAT_DEFAULT)
	@JsonFormat(pattern = CoreConstants.DATETIME_FORMAT_DEFAULT, timezone = CoreConstants.DATE_TIMEZONE_DEFAULT)
	private Date createdate;
	@DateTimeFormat(pattern = CoreConstants.DATETIME_FORMAT_DEFAULT)
	@JsonFormat(pattern = CoreConstants.DATETIME_FORMAT_DEFAULT, timezone = CoreConstants.DATE_TIMEZONE_DEFAULT)
	private Date lastdate;

	@Override
	public Serializable getPrimaryKey() {
		return id;
	}

	@Override
	public Serializable getText() {
		return name;
	}

	@Override
	public Date getCreatedate() {
		return createdate;
	}

	@Override
	public Date getLastdate() {
		return lastdate;
	}

	@Override
	public void setCreatedate(Date createdate) {
		this.createdate = createdate;
	}

	@Override
	public void setLastdate(Date lastdate) {
		this.lastdate = lastdate;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public boolean isValid() {
		return valid;
	}

	public void setValid(boolean valid) {
		this.valid = valid;
	}

	private String nameSearchKey;
	private String codeSearchKey;

	public String getNameSearchKey() {
		return nameSearchKey;
	}

	public void setNameSearchKey(String nameSearchKey) {
		this.nameSearchKey = nameSearchKey;
	}

	public String getCodeSearchKey() {
		return codeSearchKey;
	}

	public void setCodeSearchKey(String codeSearchKey) {
		this.codeSearchKey = codeSearchKey;
	}

}
